﻿using System;
using System.Collections.Generic;
using FluentValidation;
using Spaanjaars.ContactManager.Infrastructure.Validation;
using Spaanjaars.ContactManager.Model.Validation;

namespace Spaanjaars.ContactManager.Model
{
    public class NameValidator : FluentValidationAdapterBase<Name>
    {
        public NameValidator()
        {
            RuleFor(name => name.FirstName).NotEmpty().WithMessage("Please specify a first name");
            RuleFor(name => name.LastName).NotEmpty().WithMessage("Please specify a last name");            
        }
    }
}